style(cfg): apply review items in #385 for gen-config#392
style(cfg): apply review items in #385 for gen-config#392minrk merged 1 commit intoipython:masterfrom
Conversation
minrk
left a comment
There was a problem hiding this comment.
Thanks. I think only the colon on "See also" is an improvement over what is there now, so can we omit the other two changes?
| ) | ||
|
|
||
| s = "# %s(%s) configuration" % (cls.__name__, parent_classes) | ||
| s = "## %s(%s) configuration" % (cls.__name__, parent_classes) |
There was a problem hiding this comment.
Let's keep single #, not double here and above.
| lines.append('# See also: %s.%s' % (defining_class.__name__, name)) | ||
|
|
||
| lines.append('# c.%s.%s = %s' % (cls.__name__, name, default_repr)) | ||
| lines.append('#c.%s.%s = %s' % (cls.__name__, name, default_repr)) |
There was a problem hiding this comment.
The space between # and c are helpful, let's keep them here.
There was a problem hiding this comment.
Is it possible to keep it?
Otherwise, then the last code line does not differ very little from comments immediately above, and
it needs 2 key strokes to enable the code.
Note, it was like these before #385 (actually i believe it was me that had passed this change in the first place, and had been accepted).
There was a problem hiding this comment.
Let's keep the space. It's generally recommended to have a space between the comment symbol and the comment itself. Plus, editors that have a 'comment/uncomment' action generally deal with this in a single keystroke as well.
|
OK, kept only Regarding the code-lines that now have 1 space between the So the following expression can collect all code-lines (and possibly some user-edited comments, but that's ok): |
Minor changes in the formatting of the generated sample configuration-file,
as reviewed by @ankostis on #385.
The differences in the generated config-file are shown below for this code:
Wihtout this PR:
WITH this PR: